import Taro, { Component, Config } from '@tarojs/taro'
import { ScrollView, View } from '@tarojs/components'
import './index.scss'

export default class Index extends Component {
  state:any
  config: Config = {
    navigationBarTitleText: '关于我们',
    navigationBarTextStyle: process.env.navigationBarTextStyle,
    navigationBarBackgroundColor: process.env.backgroundColor
  }

  onScroll({ detail }) {
    console.log(detail)
  }

  render() {
    const list:any = []
    for (let i=0; i<100; i++){
      list.push(i)
    }
    return (<View className='test-page'>
      <ScrollView scrollY className='page-scroll' onScroll={this.onScroll.bind(this)}>
        <View className='data-list'>
          {
            list.map(item => {
              return (
                <View className='data-item'>
                  sdfsfsdf{item}
                </View>
              )
            })
          }
        </View>
      </ScrollView>
    </View>)
  }
}
